package org.climber;

import org.climber.controller.BookController;
import org.climber.dao.BookDao;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        BookController bookController = (BookController) applicationContext.getBean("bookController");
        System.out.println(bookController.test());
        bookController.find();
//        System.out.println(bookController.test());

//        BookService bookService= (BookService) applicationContext.getBean("bookService");
//        List<Book> query = bookService.query("select * from book", null);
//        query.forEach(
//                el-> System.out.println(((Book)el).toString())
//        );


    }
}
